<!-- 提交学生信息的表单 -->
<form action="{% url 'add' %}" method="post" style="display: flex; flex-direction: column;">
  {% csrf_token %}
  <label for="name" style="margin-bottom: 10px;">姓名：</label>
  <input type="text" name="name" id="name" style="padding: 5px; margin-bottom: 10px;">
  <label for="age" style="margin-bottom: 10px;">年龄：</label>
  <input type="text" name="age" id="age" style="padding: 5px; margin-bottom: 10px;">
  <label for="email" style="margin-bottom: 10px;">邮箱：</label>
  <input type="text" name="email" id="email" style="padding: 5px; margin-bottom: 10px;">
  <label for="address" style="margin-bottom: 10px;">地址：</label>
  <input type="text" name="address" id="address" style="padding: 5px; margin-bottom: 10px;">
  <label for="phone" style="margin-bottom: 10px;">电话：</label>
  <input type="text" name="phone" id="phone" style="padding: 5px; margin-bottom: 10px;">
  <input type="submit" value="提交" style="padding: 10px; background-color: #333; color: #fff; border: none; cursor: pointer;">
</form>
<!-- 回到查询学生信息的页面 -->
<a href="{% url 'search' %}" style="margin-top: 10px; color: #333;text-decoration: none; padding: 10px; background-color: #333; color: #fff; border: none; cursor: pointer;border-radius: 5px;">
  <button style="padding: 10px; background-color: #333; color: #fff; border: none; cursor: pointer; border-radius: 5px;">返回</button>
</a>

<style>
  body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    margin: 0;
    padding: 20px;
  }

  form {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  label {
    font-weight: bold;
  }

  input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
  }

  input[type="submit"] {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 3px;
  }

  a {
    color: #333;
    text-decoration: none;
  }
</style>